﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BestLifePOS_Core.Data.Commands;
using BestLifePOS_Core.DomainObjects;
using System.Data;

namespace BestLifePOS_Core.Data.Fascade
{
  public  class Purchase_RequestDAO
    {

      public static string GetNewPRId()
      {
          BestLifeGetNewPRIdDataAction LvGet = new BestLifeGetNewPRIdDataAction();
          return LvGet.execute();
      }

      public static int SavePR(Purchase_Request PPR, string Pxml)
      {
          BestLifeSaveNewPRDataAction LvIns = new BestLifeSaveNewPRDataAction(PPR, Pxml);
          return LvIns.execute();
      }
      public static List<Purchase_Request> GetAllApprovedPR()
      {
          BestLifeGetAllApprovedPRDataAction LvGet = new BestLifeGetAllApprovedPRDataAction();
          return LvGet.execute();
      }

      public static List<Purchase_Request> GetAllPRbyPRID(string PPRId)
      {
          BestLifeGetAllPRDetailsbyPRIDDataAction LvGet = new BestLifeGetAllPRDetailsbyPRIDDataAction(PPRId);
          return LvGet.execute();
      }


      public static DataTable GetAllPRDetailsbyPrid(string PPRID,string PStatus)
      {

          BestLifePRinDetailsByPridDataAction LvPR = new BestLifePRinDetailsByPridDataAction(PPRID, PStatus);
          return LvPR.execute();

      }

      public static int UpdatePR(string PPRList,string PStatus)
      {
          BestLifeUpdatePRDetailsDataAction LvPR = new BestLifeUpdatePRDetailsDataAction(PPRList, PStatus);
         return LvPR.execute();
      }

    }
}
